import request from "./request";

// 登录
export function login(data) {
  return request({
    url: '/auth/login',
    method: 'post',
    data,
  })
}


export function logout(data) {
  return request({
    url: "/auth/logout",
    method: "post",
    data,
  });
}


// 获取用户信息
export function getInfo() {
  return request({
    url: "/users/profile",
    method: "get",
  });
}


// 修改密码
export function editPassword(d) {
  return request({
    url: "/users/password",
    method: "post",
    data: d,
  });
}

// 重置密码
export function resetPasswordApi(id, d) {
  return request({
    url: `/users/password/reset/${id}`,
    method: "post",
    data: d,
  });
}